package com.model.dto.sys.menu;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@Data
public class UpdateSysMenuDTO{
    @ApiModelProperty(value = "菜单权限ID,自动递增",required = true)
    @NotNull(message = "sysMenuId不能为空")
    private Long sysMenuId;

    @ApiModelProperty(value = "菜单名称")
    @Size(min = 0, max = 50, message = "menuName长度限制为50")
    private String menuName;

    @ApiModelProperty(value = "父菜单ID")
    private Long parentId;

    @ApiModelProperty(value = "显示顺序")
    private Integer orderNum;

    @ApiModelProperty(value = "路由地址")
    @Size(min = 0, max = 50, message = "path长度限制为50")
    private String path;

    @ApiModelProperty(value = "组件路径")
    @Size(min = 0, max = 50, message = "component长度限制为50")
    private String component;

    @ApiModelProperty(value = "0:外链,1:非外链",allowableValues = "0,1")
    @Min(value = 0, message = "0:外链,1:非外链")
    @Max(value = 1, message = "0:外链,1:非外链")
    private Byte isFrame;

    @ApiModelProperty(value = "0:缓存,1:不缓存",allowableValues = "0,1")
    @Min(value = 0, message = "0:缓存,1:不缓存")
    @Max(value = 1, message = "0:缓存,1:不缓存")
    private Byte isCache;

    @ApiModelProperty(value = "0:目录,1:菜单,2:按钮",allowableValues = "0,1,2")
    @Min(value = 0, message = "0:目录,1:菜单,2:按钮")
    @Max(value = 2, message = "0:目录,1:菜单,2:按钮")
    private Byte menuType;

    @ApiModelProperty(value = "0:显示,1:隐藏",allowableValues = "0,1")
    @Min(value = 0, message = "0:显示,1:隐藏")
    @Max(value = 1, message = "0:显示,1:隐藏")
    private Byte visible;

    @ApiModelProperty(value = "权限标识")
    @Size(min = 0, max = 50, message = "perms长度限制为50")
    private String perms;

    @ApiModelProperty(value = "菜单图标")
    @Size(min = 0, max = 50, message = "icon长度限制为50")
    private String icon;

}
